package com.example.cp.mvvm.base;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

public abstract class BaseViewActivity <VDB extends ViewDataBinding>extends AppCompatActivity {
    protected VDB binding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this,bindLoutId());
        initView();
        initData();
    }
    public abstract void initView();
    public abstract void initData();
    public abstract int bindLoutId();
}
